import 'package:shopping_group/entity/rich_text_entity.dart';
import 'package:shopping_group/entity/selectiont_entity.dart';

class GroupDetailEntity {
  //人员标识
  String userId = "";
  //团规格标识+
  String groupSpecId = "";
  //本人最后一次推广标识+
  String myLastJoinId = "";
  //团类型
  String groupSpecType = "";
  //版本号
  String version = "";
  //名称
  String name = "";
  //首页图片网址
  String imgUrl = "";
  //图文详情
  String remark = "";
  //推广应支付金额
  String rechargeVal = "";
  //单团人数阀值
  String sucMenCt = "";
  //最新团实例标识
  String lastGroupInsId = "";
  //注意这个字段靠间接获取
  //最新团实例参与人数
  String lastGroupInsJoinCt = "";
  //复购前显示图片文件路径
  String reBuyImgUrl = "";
  //复购商品规格标识
  String reBuyCommoSpecId = "";
  //推广失败观看视频广告网址
  String failSeeVideoUrl = "";
  //今日本人推广序号")
  String todayJoinSeq = "";

  //算出来的
  //本人未看广告次数")
  String myNoWatchGuanGaoCt = "";
  //算出来的
  //可做什么操作，JOIN:推广，GUAN_GAO:看广告，RE_BUY:复购，NONE:什么也做不了（例如账号被冻结、已过有效时段、未买49元商品或被冻结等）
  String canDoAction = "";
  //根据canDoAction的值动态组装
  //业务提示
  String doRemark = "";
  //客户与团规格的关联记录标识")
  String custGroupSpecRelaId = "";

  //算出来的
  //真实应缴纳推广金额对应的uuid
  String payUuid = "";

  //算出来的随机值
  //真实的推广应支付金额
  String realCharge = "";

  //前端支付id
  // String zfbId = "";

  //此团可用代理券余额
  String thisGroupAcctVal = "";
  String beZonJian = '';
  String joinId;
  List<SelectiontEntity> listEntity = [];
  List<RichTextEntity> richList = [];
  int count = 0;
  //是否播放西域广告，Y为是
  String playXiYi = 'N';
  GroupDetailEntity(
      {this.userId,
      this.playXiYi,
      this.thisGroupAcctVal,
      this.payUuid,
      this.realCharge,
      this.todayJoinSeq,
      this.myNoWatchGuanGaoCt,
      this.custGroupSpecRelaId,
      this.groupSpecId,
      this.myLastJoinId,
      this.groupSpecType,
      this.version,
      this.name,
      this.imgUrl,
      this.remark,
      this.rechargeVal,
      this.sucMenCt,
      this.lastGroupInsId,
      this.lastGroupInsJoinCt,
      this.reBuyImgUrl,
      this.reBuyCommoSpecId,
      this.failSeeVideoUrl,
      this.canDoAction,
      this.doRemark});

  GroupDetailEntity.fromJson(Map<String, dynamic> json) {
    userId = json['userId'];
    playXiYi = json['playXiYi'];
    thisGroupAcctVal = json['thisGroupAcctVal'];
    payUuid = json['payUuid'];
    realCharge = json['realCharge'];
    todayJoinSeq = json['todayJoinSeq'];
    myNoWatchGuanGaoCt = json['myNoWatchGuanGaoCt'];
    custGroupSpecRelaId = json['custGroupSpecRelaId'];
    groupSpecId = json['groupSpecId'];
    myLastJoinId = json['myLastJoinId'];
    groupSpecType = json['groupSpecType'];
    version = json['version'];
    name = json['name'];
    imgUrl = json['imgUrl'];
    remark = json['remark'];
    rechargeVal = json['rechargeVal'];
    sucMenCt = json['sucMenCt'];
    lastGroupInsId = json['lastGroupInsId'];
    lastGroupInsJoinCt = json['lastGroupInsJoinCt'];
    reBuyImgUrl = json['reBuyImgUrl'];
    reBuyCommoSpecId = json['reBuyCommoSpecId'];
    failSeeVideoUrl = json['failSeeVideoUrl'];
    canDoAction = json['canDoAction'];
    doRemark = json['doRemark'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['userId'] = this.userId;
    data['thisGroupAcctVal'] = this.thisGroupAcctVal;
    data['payUuid'] = this.payUuid;
    data['realCharge'] = this.realCharge;
    data['custGroupSpecRelaId'] = this.custGroupSpecRelaId;
    data['groupSpecId'] = this.groupSpecId;
    data['myLastJoinId'] = this.myLastJoinId;
    data['groupSpecType'] = this.groupSpecType;
    data['version'] = this.version;
    data['name'] = this.name;
    data['imgUrl'] = this.imgUrl;
    data['remark'] = this.remark;
    data['rechargeVal'] = this.rechargeVal;
    data['sucMenCt'] = this.sucMenCt;
    data['lastGroupInsId'] = this.lastGroupInsId;
    data['lastGroupInsJoinCt'] = this.lastGroupInsJoinCt;
    data['reBuyImgUrl'] = this.reBuyImgUrl;
    data['reBuyCommoSpecId'] = this.reBuyCommoSpecId;
    data['failSeeVideoUrl'] = this.failSeeVideoUrl;
    data['canDoAction'] = this.canDoAction;
    data['doRemark'] = this.doRemark;
    data['todayJoinSeq'] = this.todayJoinSeq;
    data['myNoWatchGuanGaoCt'] = this.myNoWatchGuanGaoCt;
    data['playXiYi'] = this.playXiYi;
    return data;
  }
}
